const { SERVER_HOST } = require("../../sys_config");

module.exports = {
  name: "src",

  async upload(ctx) {
    ctx.body = {
      ok: 1,
      data: ctx.req.files.map((n) => ({
        name: n.filename,
        src: `${SERVER_HOST + "/" + n.filename}`,
        filed: n.fieldname,
      })),
    };
  },
};
